﻿using Dyao.Book.Contract;

namespace Dyao.Book.Application.Abstractions
{
    public interface IQiDianBookCatalogueContentSpider
    {

        /// <summary>
        /// 按照章节链接爬取正文
        /// </summary>
        /// <param name="dto">书籍信息</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns></returns>
        Task<bool> CrawContentByCatalogueAsync(CrawCatalogueContentDto dto, CancellationToken cancellationToken);

        /// <summary>
        /// 按照章节集合链接爬取正文
        /// </summary>
        /// <param name="dtos">书籍信息集合</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns></returns>
        Task<bool> CrawlContentByCataloguesAsync(List<CrawCatalogueContentDto> dtos, CancellationToken cancellationToken);
    }
}
